<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page application_helper.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name">/helpers/application_helper.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Aplication helper functions.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Andrej Jursa</li>
			</ul>
		
			</div>
</div>
		

	
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functionchange_mysql_table_to_InnoDB" id="functionchange_mysql_table_to_InnoDB"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">change_mysql_table_to_InnoDB</span> (line <span class="line-number">90</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If database uses mysql, it changes table to InnoDB engine (to support transactions).</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			change_mysql_table_to_InnoDB
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$table</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$table</span><span class="var-description">: table name.</span>			</li>
				</ul>
		
	
</div>
<a name="functioncompute_size_with_unit" id="functioncompute_size_with_unit"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">compute_size_with_unit</span> (line <span class="line-number">184</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Compute size with units from given value in bytes.</p>
	<ul class="tags">
				<li><span class="field">return:</span> size with unit.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			compute_size_with_unit
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$size_bytes</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$size_bytes</span><span class="var-description">: size in bytes.</span>			</li>
				</ul>
		
	
</div>
<a name="functioncreate_internal_url" id="functioncreate_internal_url"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">create_internal_url</span> (line <span class="line-number">27</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates internal url from relative url.</p>
<p class="description"><p>Function respects setting of rewrite engine from application/config/config.php.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> internal url.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			create_internal_url
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$relative_url</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$force_simple_link</span> = <span class="var-default">FALSE</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$relative_url</span><span class="var-description">: relative url as controller/action/[parameters].</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$force_simple_link</span><span class="var-description">: if set to TRUE, link will not use rewrite engine and url suffix, even if they are configured.</span>			</li>
				</ul>
		
	
</div>
<a name="functiondb_is_mysql" id="functiondb_is_mysql"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">db_is_mysql</span> (line <span class="line-number">80</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks if database driver uses mysql, mysqli or pdo mysql.</p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE if uses one of this drivers.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			db_is_mysql
		</span>
				()
			</div>

		
	
</div>
<a name="functiondecode_from_url" id="functiondecode_from_url"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">decode_from_url</span> (line <span class="line-number">52</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Decodes string encoded by function <a href="../LIST_Helpers/_helpers---application_helper.php.html#functionencode_for_url">encode_for_url()</a>.</p>
	<ul class="tags">
				<li><span class="field">return:</span> decoded string.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			decode_from_url
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$string</span><span class="var-description">: string to decode.</span>			</li>
				</ul>
		
	
</div>
<a name="functionencode_for_url" id="functionencode_for_url"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">encode_for_url</span> (line <span class="line-number">42</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Encodes string using base64 algorithm and replace some url invalid characters like / and = to - and _ .</p>
	<ul class="tags">
				<li><span class="field">return:</span> encoded string.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			encode_for_url
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$string</span><span class="var-description">: string to encode.</span>			</li>
				</ul>
		
	
</div>
<a name="functionget_days" id="functionget_days"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">get_days</span> (line <span class="line-number">101</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns array of days.</p>
	<ul class="tags">
				<li><span class="field">return:</span> array of days.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array<string></span>
		<span class="method-name">
			get_days
		</span>
				()
			</div>

		
	
</div>
<a name="functionget_file_size" id="functionget_file_size"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">get_file_size</span> (line <span class="line-number">171</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Compute file capacity and return value with unit.</p>
	<ul class="tags">
				<li><span class="field">return:</span> capacity of file in bytes, KiB, MiB or GiB.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			get_file_size
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filename</span><span class="var-description">: path and file name.</span>			</li>
				</ul>
		
	
</div>
<a name="functionimplode_uri_params" id="functionimplode_uri_params"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">implode_uri_params</span> (line <span class="line-number">62</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Translates url parameters to url segments string.</p>
	<ul class="tags">
				<li><span class="field">return:</span> segmented url of name =&gt; value pairs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			implode_uri_params
		</span>
					(<span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$params</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">array<mixed></span>
				<span class="var-name">$params</span><span class="var-description">: array of parameters (only non-array and non-object values will be added to output).</span>			</li>
				</ul>
		
	
</div>
<a name="functionis_mod_rewrite_enabled" id="functionis_mod_rewrite_enabled"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">is_mod_rewrite_enabled</span> (line <span class="line-number">13</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function will check if there is server variable MOD_REWRITE_ENABLED, which is created in .htaccess.</p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE, if this variable exists and is set to yes, FALSE otherwise.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			is_mod_rewrite_enabled
		</span>
				()
			</div>

		
	
</div>
<a name="functionnormalize" id="functionnormalize"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">normalize</span> (line <span class="line-number">151</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Normalizes characters in string.</p>
	<ul class="tags">
				<li><span class="field">return:</span> string with normalized characters.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			normalize
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$string</span><span class="var-description">: to normalize.</span>			</li>
				</ul>
		
	
</div>
<a name="functionsmarty_inject_days" id="functionsmarty_inject_days"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">smarty_inject_days</span> (line <span class="line-number">118</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function will construct days array and assign them to template parser.</p>
<p class="description"><p>Days array is called $list_days inside template.</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			smarty_inject_days
		</span>
				()
			</div>

		
	
</div>
<a name="functionunlink_recursive" id="functionunlink_recursive"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">unlink_recursive</span> (line <span class="line-number">128</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Recursively delete a directory.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			unlink_recursive
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span>, <span class="var-type">boolean</span>&nbsp;<span class="var-name">$delete_root_too</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dir</span><span class="var-description">: directory name.</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$delete_root_too</span><span class="var-description">: delete specified top-level directory as well.</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Fri, 13 Sep 2013 12:32:29 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>